import React from 'react';
import CommonMenu from '../components/commonMenu';
import CommonHeader from '../components/commonHeader';
import { Layout, theme } from 'antd';
import { Outlet } from 'react-router-dom';
import withAuthRedirect from '@/util/withAuthRedirect';
const { Content } = Layout;
const Main = () => {
  const {
    token: { colorBgContainer, borderRadiusLG },
  } = theme.useToken();
  return (
    <Layout style={{ height: '100vh' }}>
      <CommonMenu />
      <Layout>
        <CommonHeader />
        <Content
          style={{
            margin: '24px 16px',
            padding: 24,
            minHeight: 280,
            background: colorBgContainer,
            borderRadius: borderRadiusLG,
          }}
        >
          <Outlet></Outlet>
        </Content>
      </Layout>
    </Layout>
  );
};
export default withAuthRedirect(Main);